[#ftl]
[#compress]
[#include "util10.ftl"/]
<!DOCTYPE html>
[@shrinksafe key="home" cached=shrinkCached shrink=shrink contentType="html"]
[#if applicationMode = "PROD"]
<html manifest="indexCacheManifest.manifest">
[#else]
<html>
[/#if]
<head>
[@htmlMeta/]
<script type="text/javascript">
[@funcCreateIframe/]
</script>
<style type="text/css">
.bp_theme {font:12px Myriad,Helvetica,Tahoma,Arial,clean,sans-serif}
@media screen and (max-width:480px){
	.bp_theme {font:8px Myriad,Helvetica,Tahoma,Arial,clean,sans-serif}
}
@media screen and (max-height:480px){
	.bp_theme {font:8px Myriad,Helvetica,Tahoma,Arial,clean,sans-serif}
}
</style>
</head>
<body class="bp_theme" style="background-color:white;">
<div style="margin:auto;position:absolute;top:0px;left:0px;bottom:0px;right:0px;width:65%;height:30%">
	[@logo/]		
	<div style="color:#0000ff;font-size:1.8em;font-style:italic;display:inline;width:60em">
		Downloading <span id="progress"></span>...please wait
	</div>		
</div>
<script type="text/javascript">
	
	var cache = window.applicationCache;
	if(cache){
	  cache.addEventListener('updateready', function(e) {
		  cache.swapCache();				
		  	window.location.reload();	
	  }, false);
	}
	
	var checkCount = 0;
	window.setTimeout(function(){
		var frame = window.frames[0];
		var progress = window.document.getElementById("progress");
		var handler = window.setInterval(function(){
			var node = frame.document.getElementById("progress");	
			progress.innerHTML = node.innerHTML;
			if(node.innerHTML == "100%" || (checkCount++ > 10 && node.innerHTML == "")){		
				progress.innerHTML = "100%";
				window.clearInterval(handler);
				window.location.assign("[#if applicationMode = "PROD"]/${context}/index1.html[#else]/v/${context}/index1[/#if]");
			}
		},200);
	},100);
	
	_createIframe("[#if applicationMode = "PROD"]/${context}/index1Shadow.html[#else]/v/${context}/index1Shadow[/#if]");
</script>
</body>
</html>
[/@]
[/#compress]
